<div class="modal hide fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 <?= form_open('user/goals/update_result')?> 
<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">Edit Result</h3>
  </div>
  <div class="modal-body">
 
  <?php 
foreach($results as $result)
{
?>
  <table width="100%">
  <tr>
    <td width="18%" valign="top">
    <input type="hidden" value="<?= $result->id?>" name="id" />
    <input type="hidden" value="<?= $result->goal_id?>" name="goal_id" />
    <strong>Description</strong></td>
    
    <td colspan="2"><textarea name="desc"><?= $result->desc?></textarea></td>
    </tr>
  <tr>
    <td><strong>Priority</strong></td>
    <td width="29%"><input type="radio" value="low"  id="radioBtn1" onmouseup="toggle(this);" name="priority" 
    <?php if($result->priority == 'low'){
	echo 'checked="checked"' ;
	}?>
     />
    <img  src="<?= $this->config->base_url(); ?>assets/images/green_flag.png" />
    </td>
    <td width="34%"><input type="radio" value="medium"  id="radioBtn2"  onmouseup="toggle(this);" name="priority" 
     <?php if($result->priority == 'medium'){
	echo 'checked="checked"' ;
	}?>
    /> <img  src="<?= $this->config->base_url(); ?>assets/images/blue_flag.png" />
    </td>
	<td width="19%"><input type="radio" value="high"  id="radioBtn3" onmouseup="toggle(this);" name="priority" 
     <?php if($result->priority == 'high'){
	echo 'checked="checked"' ;
	}?>
     />
    <img  src="<?= $this->config->base_url(); ?>assets/images/red_flag.png" />
    
    </td>
    
    </tr>
  
</table> 

<?php }?>

  </div>
  <div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
    <input type="submit" class="btn btn-primary" value="Update" />
  </div>
  </form>
</div>
